using System.ComponentModel.DataAnnotations;

namespace S.M.SmartMedical.Domain.Entities
{
    /// <summary>
    /// 医院院区实体
    /// 用于存储医院各个院区的基本信息
    /// </summary>
    public class HospitalArea : BaseEntity
    {
        /// <summary>
        /// 院区名称
        /// </summary>
        [Required]
        [MaxLength(100)]
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 院区地址
        /// </summary>
        [Required]
        [MaxLength(200)]
        public string Address { get; set; } = string.Empty;

        /// <summary>
        /// 联系电话
        /// </summary>
        [MaxLength(20)]
        public string? Phone { get; set; }

        /// <summary>
        /// 院区描述
        /// </summary>
        [MaxLength(500)]
        public string? Description { get; set; }

        /// <summary>
        /// 是否支持自助开单
        /// </summary>
        [Required]
        public bool IsSelfServiceEnabled { get; set; } = true;

        /// <summary>
        /// 院区标签（JSON格式存储，如：["综合医院", "三甲", "24小时急诊"]）
        /// </summary>
        [MaxLength(500)]
        public string? Tags { get; set; }

        /// <summary>
        /// 经度
        /// </summary>
        public decimal? Longitude { get; set; }

        /// <summary>
        /// 纬度
        /// </summary>
        public decimal? Latitude { get; set; }

        /// <summary>
        /// 排序顺序
        /// </summary>
        public int SortOrder { get; set; } = 0;

        /// <summary>
        /// 是否启用
        /// </summary>
        [Required]
        public bool IsEnabled { get; set; } = true;
    }
}